HTML is a markup language that uses tags on data to define the formatting of that data. HTML is the language of the Web describing to Web browsers how to present the content of the Web page to the user. Tables are a primary feature of HTML used to design and develop the presentation of a Web site. Information and material may be placed into tables for display by the Web browser. HTML editors are commonly used by Web designers to generate the HTML code for Web pages and Web sites. Modern Web pages and Web sites also include considerable embedded non-HTML code or script. However, HTML still forms the basis for much of the Web.
HTML editors have evolved from simple code editors to visual editors that render the HTML to the designer and allows the designer to visually edit the design while letting the HTML editor automatically generate the underlying HTML code. Some HTML editors, such as MACROMEDIA's DREAMWEAVER™, MICROSOFT CORPORATION's FRONTPAGE™, and the like, allow editing in both a visual and a code view either separately or concurrently. In working with tables in HTML editors, it is often easy to wind up with inconsistent values in the table formatting parameters, such as cell height and width and table height and width. This leads to unpredictable results when viewing the Web page in a browser (e.g., Internet Explorer or Netscape Navigator).
An HTML table is generally made up of several HTML tags, there is a <table> tag that delineates the table, and then there are rows, which are expressed with a <tr> tag. Each cell of the table is expressed with a <td> tag. A column is basically defined as the cells that are visibly displayed vertically when the HTML is rendered in a browser. However, the column code actually corresponds to the first <td> tag of every row, the second <td> tag of every row, and so on.
The content of a table is defined inside of a table cell, expressed with the <td> tag. The visual width and height of a table cell are usually defined by the width and height attributes of the <td> tag. Table cell heights and widths are constrained by the cell content. The visible cell height or width may be larger than the explicit width or height attribute if the cell content is bigger than the explicit width or height. For example, if an image within a cell is 100 pixels high, then the table cell and the table row cannot typically be any shorter than 100 pixels even if the explicit height is less than 100 pixels, but it could be bigger if the explicit height is greater than 100 pixels.
Visual HTML editors have table editing functionality but many of them do not typically create clean table code that is consistent across the table. Such inconsistencies tend not to work well on the browser, such that the table will often not look the same in the browser as it does in the editor (or will not look the same in different browsers or on different platforms). In many visual editors, a user will attempt to resize a column by dragging its border. However, because many of the cells in the column may have inconsistent widths or contain content, when the user drops the border, it sometimes will snap to a completely different, unexpected position.
An example of an inconsistent parameter would be to manually set a cell width of 10 pixels, but then actually place an image within that cell that is wider than 10 pixels. Therefore, the explicit width is inconsistent with the actual width that is seen. However, there is no way that the cell can be 10 pixels wide, so in the previous editors, when a user drags the column border to resize the column at some width around 10 pixels, the editor displays the editing to the user as the user drags the border. The editor observes that the image is much wider than 10 pixels (e.g. 90 pixels) and determines that the column cannot be 10 pixels wide. Therefore, as the user releases the column border, the editor would automatically place the column width at a reasonable width, such as 100 pixels, to accommodate the larger image. However, to the user, it appears that the column width snapped to a position that had nothing to do with the user's attempt to visually edit.
Most visual table editors insert height and width attributes into every cell in the table when the table is resized. While such table editors may allow a designer to manually enter or change the width/height in one cell or column, as soon as the table is visually resized, the table editor would add the resized width to every cell. This makes the table larger and have more lines of code than necessary. Furthermore, each of the user's manual entries is generally changed when a visual resize is done. Thus, if the user continues to make manual edits and visual edits, the chance exists that the resulting table include various different size parameters, height or width, for all of the cells. This causes inconsistent rendering of the table in browsers.